package com.ljw.vendingmachine.bean;

import android.os.Build;
import android.support.annotation.RequiresApi;

import java.util.List;
import java.util.Objects;


public class TestItem implements Cloneable {
    private int id;
    private int gNo;
    private int status;
    private boolean isTest = false;

    public boolean isTest() {
        return isTest;
    }

    public void setTest(boolean test) {
        isTest = test;
    }


    public int getgNo() {
        return gNo;
    }

    public void setgNo(int gNo) {
        this.gNo = gNo;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        TestItem testItem = (TestItem) o;
        return gNo == testItem.gNo;
    }

    @RequiresApi(api = Build.VERSION_CODES.KITKAT)
    @Override
    public int hashCode() {

        return Objects.hash(gNo);
    }

    @Override
    public String toString() {
        return "TestItem{" +
                "id=" + id +
                ", gNo=" + gNo +
                ", status=" + status +
                ", isTest=" + isTest +
                '}';
    }
}
